/**
 * @param id - 班级 id
 * @user_id - 被报名人的 id
 */
interface RegisterForSomeoneAPIData {
  id: string
  user_id: string
}

interface RegisterForSomeoneAPIResData {
  code: number
  msg: string
  time: string
  data: null
}

/**
 * @description 根据传入的班级 id，和 user id，为他人报名
 */
export function registerForSomeoneAPI(data: RegisterForSomeoneAPIData, token: string) {
  return httpInstance.post<RegisterForSomeoneAPIResData, RegisterForSomeoneAPIData>(
    '/api/classes/otherreport',
    data,
    { headers: { token } },
  )
}
